<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<meta charset="UTF-8" />
	<title>修改</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <link th:href="@{/static/css/right4.css}" rel="stylesheet">
    <!--[if lt IE 9]>
      <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>

	<div class="container bg-white">
       <div class="row">
        <div class="col-md-8 col-md-offset-2  col-xs-8 col-xs-offset-2   col-lg-8 col-lg-offset-2 ">
             <br>
            <form class="form-horizontal" th:if="${session.user.teacher_id eq null}" th:action="@{'/teacher/update/'+${currentPage}}" th:object="${teacher}" method="post">
            	<input type="hidden" id="id" name="id" th:value="${teacher.id}" />
            	<input type="hidden" id="user_id" name="user_id" th:value="${teacher.user_id}" />
             <br>
             	<div style="border-left:#3399FF solid 2px; padding:10px;"><h4>修改教练信息</h4></div>
                <hr>
                 <div class="form-group">
                    <label for="" class="col-sm-3 control-label"> 教练的名称</label>
                    <div class="col-sm-7">
                    <input type="text" class="form-control" name="username" id="username" th:value="${teacher.username}"/>
                    </div>
                  </div>	
                 <div class="form-group">
                    <label for="" class="col-sm-3 control-label"> 教练的年龄</label>
                    <div class="col-sm-7">
                    	<input type="text" class="form-control" name="age" id="age" th:value="${teacher.age}"/>
                    </div>
                  </div>	
                  <div class="form-group" th:switch="${teacher.gender}">
                    	<label for="" class="col-sm-3 control-label">性别 </label>
                    	<div class="col-sm-8" th:case="1">
	                      <label class="checkbox-inline">
	                          <input type="radio" name="gender" id="gender" value="1" checked="checked"> 男
	                        </label>
	                        <label class="checkbox-inline">
	                          <input type="radio" id="gender" name="gender" value="2"> 女
	                        </label>      
	                    </div>
                    	<div class="col-sm-8" th:case="2">
	                      <label class="checkbox-inline">
	                          <input type="radio" name="gender" id="gender" value="1"> 男
	                        </label>
	                        <label class="checkbox-inline">
	                          <input type="radio" id="gender" name="gender" value="2" checked="checked"> 女
	                        </label>      
	                    </div>
                  </div>
                  <div class="form-group" th:switch="${teacher.locked}">
                  		<label for="" class="col-sm-3 control-label">是否锁定 </label>
					    <div class="col-sm-7" th:case="1">
					    	<label class="checkbox-inline">
	                          <input type="radio" id="locked" name="locked" value="0"> 锁定
	                        </label> 
					    	<label class="checkbox-inline">
	                          <input type="radio" id="locked" name="locked" value="1" checked="checked"> 正常
	                        </label> 
					    </div>
					    <div class="col-sm-10" th:case="0">
					    	  <label class="checkbox-inline">
		                          <input type="radio" id="locked" name="locked" value="0" checked="checked"> 锁定
		                        </label> 
						    	<label class="checkbox-inline">
		                          <input type="radio" id="locked" name="locked" value="1"> 正常
		                        </label> 
					    </div>
					  </div>
				<div class="form-group">
                    <label for="" class="col-sm-3 control-label"> 教练级别</label>
                    <div class="col-sm-7">
                    	<input type="text" class="form-control" name="rank" id="rank" th:value="${teacher.rank}"/>
                    </div>
                  </div>	
                <div class="form-group">    
                 <br>
                    <div class="col-sm-1 col-sm-offset-7 ">
                    <button type="submit" class="btn btn-primary">保存</button>
                    </div>
                </div>
              </form>    
            <form class="form-horizontal" th:if="${session.user.teacher_id ne null}" th:action="@{'/teacher/update/'+${session.user.teacher_id}+'/'+${currentPage}}" th:object="${teacher}" method="post">
            	<input type="hidden" id="id" name="id" th:value="${teacher.id}" />
            	<input type="hidden" id="user_id" name="user_id" th:value="${teacher.user_id}" />
             <br>
             	<div style="border-left:#3399FF solid 2px; padding:10px;"><h4>修改教练信息</h4></div>
                <hr>
                 <div class="form-group">
                    <label for="" class="col-sm-3 control-label"> 教练的名称</label>
                    <div class="col-sm-7">
                    <input type="text" class="form-control" name="username" id="username" th:value="${teacher.username}"/>
                    </div>
                  </div>	
                 <div class="form-group">
                    <label for="" class="col-sm-3 control-label"> 教练的年龄</label>
                    <div class="col-sm-7">
                    	<input type="text" class="form-control" name="age" id="age" th:value="${teacher.age}"/>
                    </div>
                  </div>	
                  <div class="form-group" th:switch="${teacher.gender}">
                    	<label for="" class="col-sm-3 control-label">性别 </label>
                    	<div class="col-sm-8" th:case="1">
	                      <label class="checkbox-inline">
	                          <input type="radio" name="gender" id="gender" value="1" checked="checked"> 男
	                        </label>
	                        <label class="checkbox-inline">
	                          <input type="radio" id="gender" name="gender" value="2"> 女
	                        </label>      
	                    </div>
                    	<div class="col-sm-8" th:case="2">
	                      <label class="checkbox-inline">
	                          <input type="radio" name="gender" id="gender" value="1"> 男
	                        </label>
	                        <label class="checkbox-inline">
	                          <input type="radio" id="gender" name="gender" value="2" checked="checked"> 女
	                        </label>      
	                    </div>
                  </div>
                  <div class="form-group" th:switch="${teacher.locked}">
                  		<label for="" class="col-sm-3 control-label">是否锁定 </label>
					    <div class="col-sm-7" th:case="1">
					    	<label class="checkbox-inline">
	                          <input type="radio" id="locked" name="locked" value="0"> 锁定
	                        </label> 
					    	<label class="checkbox-inline">
	                          <input type="radio" id="locked" name="locked" value="1" checked="checked"> 正常
	                        </label> 
					    </div>
					    <div class="col-sm-10" th:case="0">
					    	  <label class="checkbox-inline">
		                          <input type="radio" id="locked" name="locked" value="0" checked="checked"> 锁定
		                        </label> 
						    	<label class="checkbox-inline">
		                          <input type="radio" id="locked" name="locked" value="1"> 正常
		                        </label> 
					    </div>
					  </div>
				<div class="form-group">
                    <label for="" class="col-sm-3 control-label"> 教练级别</label>
                    <div class="col-sm-7">
                    	<input type="text" class="form-control" name="rank" id="rank" th:value="${teacher.rank}"/>
                    </div>
                  </div>	
                <div class="form-group">    
                 <br>
                    <div class="col-sm-1 col-sm-offset-7 ">
                    <button type="submit" class="btn btn-primary">保存</button>
                    </div>
                </div>
              </form>    
       	</div>
       </div>      
	</div>
	<script th:src="@{/static/js/jquery-2.1.4.js}"></script>
</body>
</html>